package cheshi;

import java.util.Arrays;
import java.util.Locale;
import java.util.Scanner;

public class Main {


    public static void main(String[] args) {

       /*  String s = "adsfef";
         char arr[] = s.toCharArray();
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
        }
        System.out.println("--------------");
        String r = new String(arr);
        System.out.println(r);*/
        /*int [] arr = new int[26];
        String s = "adasdasda";
        for (int i = 0; i < s.length(); i++) {
             char ch = s.charAt(i);
             arr[ch-'a']++;

        }
        for (int i = 0; i < s.length(); i++) {
            if(arr[i]==1)
            {


                return 1;
            }
        }
        return -1;
*/

            String s = "dsfsdfa sdfas adsfsd";
            int count = 0;

            for (int i = 0; i < s.length(); i++) {
                if (i==0||(s.charAt(i - 1)== ' ') && (s.charAt(i) != ' ')) {
                    count++;
                }
            }

        System.out.println(count);
    }
}


